import service from '@/utils/request'

export const getMessageListApi = (params) => {
  return service.get('/chat/test/getMessageList', { params })
}
export const getFeedListApi = (params) => {
  return service.get('/chat/test/getFeedList', { params })
}
export const getFriendAndGroupListApi = (params) => {
  return service.get('/chat/test/getFriendAndGroupList', { params })
}
// export const searchUserAndGroupApi = (params) => {
//   return service.get('/chat/test/searchUserAndGroup', { params })
// }
// 搜索用户
export const searchUserListApi = (params) => {
  return service.get('/chat/test/searchUserList', { params })
}

// 搜索群组
export const searchGroupListApi = (params) => {
  return service.get('/chat/test/searchGroupList', { params })
}

// 添加好友
export const addFriendApi = (params) => {
  return service.post('/chat/test/addFriend', params)
}

// 加入群组
export const joinGroupApi = (params) => {
  return service.post('/chat/test/joinGroup', params)
}

// 好友申请列表
export const getRequestFriendListApi = (params) => {
  return service.get('/chat/test/getRequestFriendList', { params })
}

export const receiveFriendRequestApi = (params) => {
  return service.get('/chat/test/receiveFriendRequest', { params })
}

export const rejectFriendRequestApi = (params) => {
  return service.get('/chat/test/rejectFriendRequest', { params })
}

// 注册用户 register
export const registerApi = (params) => {
  return service.post('/chat/test/register', params)
}
